﻿using System;
using DMS.BaseClass;
using Yidu.Persister;

namespace DMS.Web.Modules.BaseSettings {
    public partial class FileSelect : System.Web.UI.Page {
        public string ErrorFileId = "";
        protected void Page_Load(object sender, EventArgs e) {
            string fileId = Request.Params["fileId"];
            if (string.IsNullOrEmpty(fileId)) {
                fileId = ErrorFileId;
            }
            if (string.IsNullOrEmpty(fileId)) {
                return;
            }
            SysUploadBinaryData upload = DaoFactory.Instance.Dao.Load<SysUploadBinaryData>(fileId);
            if (upload != null) {
                Response.BinaryWrite(upload.BinaryData);
            }
            
        }
    }
}